package com.wiscamp.ninechapters.tags.domain.models;

import cube.common.core.ParseUtils;
import cube.ddd.domain.Entity;
import lombok.Data;

import java.io.Serial;
import java.util.Collection;

/**
 * 课程大纲
 */
@Data
public class CourseOutline implements Entity {

    @Serial
    private static final long serialVersionUID = 8195193031551190623L;

    /**
     * 内容编号
     */
    private long outlineId = 0;

    /**
     * 课程编号
     */
    private long courseId = 0;

    /**
     * 内容名
     */
    private String outlineName = "";

    /**
     * 父级编号
     */
    private long parentId = 0;

    /**
     * 内容层级
     */
    private int outlineLevel = 0;

    /**
     * 序号
     */
    private int outlineIndex = 0;

    /**
     * 关联知识点 （逗号间隔）
     */
    private String associatedPoints = "";

    /**
     * 关联学科知识点编号列表
     */
    private Collection<Long> knowledgePointIds;

    public Collection<Long> getKnowledgePointIds() {
        return ParseUtils.parseLong(associatedPoints, ",");
    }

    /**
     * 关联标签 （逗号间隔）
     */
    private String associatedTags = "";

    /**
     * 关联标签编号列表
     */
    private Collection<Long> tagIds;

    public Collection<Long> getTagIds() {
        return ParseUtils.parseLong(associatedTags, ",");
    }

    /**
     * 最少测评问题数量
     */
    private int problemQuantity = 0;

    /**
     * 视频地址  （逗号间隔）
     */
    private String videoUrl = "";

    /**
     * 视频地址列表
     */
    private Collection<String> videoUrls;

    public Collection<String> getVideoUrls() {
        return ParseUtils.parseString(videoUrl, ",");
    }

    /**
     * 备注
     */
    private String remark = "";

    /**
     * 是否可用
     */
    private boolean enabled = true;

    /**
     * 是否删除
     */
    private boolean deleted = false;

    private String courseName = "";

    private String parentName = "";


}
